package com.ruoyi.appraise.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.appraise.mapper.TechnicianAppraiseMapper;
import com.ruoyi.appraise.domain.TechnicianAppraise;
import com.ruoyi.appraise.service.ITechnicianAppraiseService;

/**
 * 技师评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class TechnicianAppraiseServiceImpl implements ITechnicianAppraiseService 
{
    @Autowired
    private TechnicianAppraiseMapper technicianAppraiseMapper;

    /**
     * 查询技师评价
     * 
     * @param id 技师评价主键
     * @return 技师评价
     */
    @Override
    public TechnicianAppraise selectTechnicianAppraiseById(Long id)
    {
        return technicianAppraiseMapper.selectTechnicianAppraiseById(id);
    }

    /**
     * 查询技师评价列表
     * 
     * @param technicianAppraise 技师评价
     * @return 技师评价
     */
    @Override
    public List<TechnicianAppraise> selectTechnicianAppraiseList(TechnicianAppraise technicianAppraise)
    {
        return technicianAppraiseMapper.selectTechnicianAppraiseList(technicianAppraise);
    }

    /**
     * 新增技师评价
     * 
     * @param technicianAppraise 技师评价
     * @return 结果
     */
    @Override
    public int insertTechnicianAppraise(TechnicianAppraise technicianAppraise)
    {
        technicianAppraise.setCreateTime(DateUtils.getNowDate());
        return technicianAppraiseMapper.insertTechnicianAppraise(technicianAppraise);
    }

    /**
     * 修改技师评价
     * 
     * @param technicianAppraise 技师评价
     * @return 结果
     */
    @Override
    public int updateTechnicianAppraise(TechnicianAppraise technicianAppraise)
    {
        technicianAppraise.setUpdateTime(DateUtils.getNowDate());
        return technicianAppraiseMapper.updateTechnicianAppraise(technicianAppraise);
    }

    /**
     * 批量删除技师评价
     * 
     * @param ids 需要删除的技师评价主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianAppraiseByIds(Long[] ids)
    {
        return technicianAppraiseMapper.deleteTechnicianAppraiseByIds(ids);
    }

    /**
     * 删除技师评价信息
     * 
     * @param id 技师评价主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianAppraiseById(Long id)
    {
        return technicianAppraiseMapper.deleteTechnicianAppraiseById(id);
    }
}
